package cn.phecda.boot.data.mybatis.plus;

import cn.phecda.boot.common.lang.util.SnowflakeUtils;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;

/**
 * <p> 雪花算法主键生成 </p>
 *
 * @author : wanpinwei
 */
public class SnowflakeIdentifierGenerator implements IdentifierGenerator {

    @Override
    public Number nextId(Object entity) {
        return SnowflakeUtils.nextId();
    }
}
